<?php

class Damages_Exception_Core extends Exception {

  protected $type = null;
  protected $doLog = false;
  protected $userMessage = '';
  protected $callback = null;

  public function __construct() {
    if ($this->doLog) {
      $logger = new Damages_Logger();
      $logger->logException($this);
    }
  }

  public function getType() {
    return ($this->type === null) ? self::TYPE_NOTICE : $this->type;
  }

  public function getUserMessage() {
    return $this->userMessage;
  }

  public function getCallback() {
    return $this->callback;
  }

}